﻿using DocumentFormat.OpenXml.Lite.PresentationML.Presentation.Types;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.PresentationML.Presentation.PresentationElements
{
    [XmlRoot("modifyVerifier", Namespace = Constants.Presentation)]
    public class ModifyVerifier : XmlSerializable
    {
        [XmlAttribute("cryptProviderType", Form = XmlSchemaForm.Qualified)]
        public ST_CryptProv CryptographicProviderType { get; set; }

        [XmlAttribute("cryptAlgorithmClass", Form = XmlSchemaForm.Qualified)]
        public ST_AlgClass CryptographicAlgorithmClass { get; set; }

        [XmlAttribute("cryptAlgorithmType", Form = XmlSchemaForm.Qualified)]
        public ST_AlgType CryptographicAlgorithmType { get; set; }

        [XmlAttribute("cryptAlgorithmSid", Form = XmlSchemaForm.Qualified)]
        public uint CryptographicHashingAlgorithm { get; set; }

        [XmlAttribute("spinCount", Form = XmlSchemaForm.Qualified)]
        public uint IterationsToRunHashingAlgorithm { get; set; }

        [XmlAttribute("saltData", Form = XmlSchemaForm.Qualified)]
        public string SaltForPasswordVerifier { get; set; }

        [XmlAttribute("hashData", Form = XmlSchemaForm.Qualified)]
        public string PasswordHash { get; set; }

        [Optional]
        [XmlAttribute("cryptProvider", Form = XmlSchemaForm.Qualified)]
        public string CryptographicProvider { get; set; }

        [Optional]
        [XmlAttribute("algIdExt", Form = XmlSchemaForm.Qualified)]
        public Nullable<uint> CryptographicAlgorithmExtensibility { get; set; }

        [Optional]
        [XmlAttribute("algIdExtSource", Form = XmlSchemaForm.Qualified)]
        public string AlgorithmExtensibilitySource { get; set; }

        [Optional]
        [XmlAttribute("cryptProviderTypeExt", Form = XmlSchemaForm.Qualified)]
        public Nullable<uint> CryptographicProviderTypeExtensibility { get; set; }

        [Optional]
        [XmlAttribute("cryptProviderTypeExtSource", Form = XmlSchemaForm.Qualified)]
        public string ProviderTypeExtensibilitySource { get; set; }

        public ModifyVerifier() { }
    }
}
